package com.yy.mapper;

import com.yy.pojo.Teacher;
import org.apache.ibatis.annotations.Many;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface TeacherMapper {
    @Select("select * from teacher where teacher_id=#{id}")
    @Results({
            @Result(column = "teacher_id", property = "course", many = @Many(select = "com.yy.mapper.CourseMapper.selectAllCourse"))
    })
    List<Teacher> selectAllTeacher(int id);
}
